@inject MessageService _message

<Popconfirm Title="@("Are you sure delete this task?")"
            OnConfirm="Confirm"
            OnCancel="Cancel"
            OkText="Yes"
            CancelText="No">
    <a>Delete</a>
</Popconfirm>

@code{

    private void Confirm()
    {
        _message.Success("Clicked on Yes");
    }

    private void Cancel()
    {
        _message.Error("Clicked on No");
    }

}